@import "../../styles/colors";

@darkTheme: rgba(70,76,91,.9);
@lightTheme: rgba(217, 217, 217, 0.5);

.cm-tooltip{
  position: relative;
}
.cm-tooltip, .cm-tooltip-rel {
  display: inline-block;
}
.cm-tooltip-rel {
  position: relative;
  width: inherit;
}
.cm-tooltip-popper {
  display: block;
  visibility: visible;
  font-size: 14px;
  line-height: 1.5;
  position: absolute;
  z-index: 1060;
}
.cm-tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.cm-tooltip-popper[x-placement^=bottom] {
  padding: 8px 0 5px;
}
.cm-tooltip-popper[x-placement^=top] {
  padding: 5px 0 8px;
}
.cm-tooltip-popper[x-placement^=left] {
  padding: 0 8px 0 5px;
}
.cm-tooltip-popper[x-placement^=right] {
  padding: 0 5px 0 8px;
}
.cm-tooltip-popper[x-placement^=bottom] .cm-tooltip-arrow {
  top: 3px;
  border-width: 0 5px 5px;
  border-bottom-color: @darkTheme;
}
.cm-tooltip-popper[x-placement^=top] .cm-tooltip-arrow {
  bottom: 3px;
  border-width: 5px 5px 0;
  border-top-color: @darkTheme;
}
.cm-tooltip-popper[x-placement^=left] .cm-tooltip-arrow {
  right: 3px;
  border-width: 5px 0 5px 5px;
  border-left-color: @darkTheme;
}
.cm-tooltip-popper[x-placement^=right] .cm-tooltip-arrow {
  left: 3px;
  border-width: 5px 5px 5px 0;
  border-right-color: @darkTheme;
}

.cm-tooltip-popper[x-placement=top] .cm-tooltip-arrow,
.cm-tooltip-popper[x-placement=bottom] .cm-tooltip-arrow {
  left: 50%;
  margin-left: -5px;
}
.cm-tooltip-popper[x-placement=bottomLeft] .cm-tooltip-arrow,
.cm-tooltip-popper[x-placement=topLeft] .cm-tooltip-arrow {
  left: 16px;
}
.cm-tooltip-popper[x-placement=bottomRight] .cm-tooltip-arrow,
.cm-tooltip-popper[x-placement=topRight] .cm-tooltip-arrow {
  right: 16px;
}
.cm-tooltip-popper[x-placement=right] .cm-tooltip-arrow,
.cm-tooltip-popper[x-placement=left] .cm-tooltip-arrow {
  top: 50%;
  margin-top: -5px;
}
.cm-tooltip-popper[x-placement=rightTop] .cm-tooltip-arrow,
.cm-tooltip-popper[x-placement=leftTop] .cm-tooltip-arrow{
  top: 8px;
}
.cm-tooltip-popper[x-placement=rightBottom] .cm-tooltip-arrow,
.cm-tooltip-popper[x-placement=leftBottom] .cm-tooltip-arrow{
  bottom: 8px;
}



.cm-tooltip-inner {
  max-width: 250px;
  min-height: 34px;
  padding: 8px 12px;
  color: #fff;
  text-align: left;
  text-decoration: none;
  background-color: @darkTheme;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,.2);
  white-space: nowrap;
}
.cm-tooltip-inner-with-width {
  white-space: pre-wrap;
  text-align: justify;
}

.cm-tooltip-light{
  .cm-tooltip-inner {
    color: @color-ctx;
    background-color: #fff;
  }
  .cm-tooltip-arrow:after {
    display: block;
    width: 0;
    height: 0;
    position: absolute;
    border: 7px solid transparent;
    content: "";
  }
  .cm-tooltip-popper[x-placement^=bottom] .cm-tooltip-arrow:after {
    content: " ";
    top: 1px;
    margin-left: -7px;
    border-top-width: 0;
    border-bottom-width: 7px;
    border-bottom-color: #fff;
  }

  .cm-tooltip-popper[x-placement^=top] .cm-tooltip-arrow:after {
    content: " ";
    bottom: 1px;
    margin-left: -7px;
    border-bottom-width: 0;
    border-top-width: 7px;
    border-top-color: #fff;
  }

  .cm-tooltip-popper[x-placement^=left] .cm-tooltip-arrow:after {
    content: " ";
    right: 1px;
    border-right-width: 0;
    border-left-width: 7px;
    border-left-color: #fff;
    bottom: -7px;
  }

  .cm-tooltip-popper[x-placement^=right] .cm-tooltip-arrow:after {
    content: " ";
    left: 1px;
    bottom: -7px;
    border-left-width: 0;
    border-right-width: 7px;
    border-right-color: #fff;
  }

  .cm-tooltip-popper[x-placement^=top] {
    padding: 7px 0 10px;
  }
  .cm-tooltip-popper[x-placement^=bottom] {
    padding: 10px 0 7px;
  }
  .cm-tooltip-popper[x-placement^=left] {
    padding: 0 10px 0 7px;
  }
  .cm-tooltip-popper[x-placement^=right] {
    padding: 0 7px 0 10px;
  }
  

  .cm-tooltip-popper[x-placement=top] .cm-tooltip-arrow,
  .cm-tooltip-popper[x-placement=bottom] .cm-tooltip-arrow {
    left: 50%;
    margin-left: -7px;
  }
  .cm-tooltip-popper[x-placement=left] .cm-tooltip-arrow,
  .cm-tooltip-popper[x-placement=right] .cm-tooltip-arrow {
    top: 50%;
    margin-top: -7px;
  }
  .cm-tooltip-popper[x-placement^=bottom] .cm-tooltip-arrow {
    border-width: 0 7px 7px;
    border-bottom-color: @lightTheme;
  }
  .cm-tooltip-popper[x-placement^=top] .cm-tooltip-arrow {
    border-width: 7px 7px 0;
    border-top-color: @lightTheme;
  }
  .cm-tooltip-popper[x-placement^=left] .cm-tooltip-arrow {
    border-width: 7px 0 7px 7px;
    border-left-color: @lightTheme;
  }
  .cm-tooltip-popper[x-placement^=right] .cm-tooltip-arrow {
    border-width: 7px 7px 7px 0;
    border-right-color: @lightTheme;
  }
}